<template>

  <div class="questions-body">

 	<searchView></searchView>	
 	<div class="top-tis">
 		<Breadcrumb>
        	<Breadcrumb-item>你当前位置</Breadcrumb-item>
        	<Breadcrumb-item href="/index">首页</Breadcrumb-item>
       	 <Breadcrumb-item>药典</Breadcrumb-item>
    	</Breadcrumb>
 	</div>	

 	<div class="questions-view">
 	
	 	<Table :columns="columns" :data="ccData"></Table>

 	</div>

  </div>
</template>
<style scoped>
   
@import '../../assets/css/ccm.css';

</style>

<script>


export default {
	components:{
	  },
          
  data(){

    return {

    	ccData:[],
    	columns: [
            {
                title: '名称',
                key: 'name',
                align:'left'
            },
            {
                title: '状态',
                key: 'statusText',
                align:'left'
            },
            {
              title: '操作',
              key: 'action',
              width: 150,
              align: 'center',
              render: (h, params) => {
                  return h('div', [
                      h('Button', {
                          props: {
                              type: 'primary',
                              size: 'small'
                          },
                          style: {
                              marginRight: '5px'
                          },
                          on: {
                              click: () => {
                                  // this.routeLink('/term-content?id=' + params.row.id);
                              }
                          }
                      }, '下载'),
                  ]);
              }
          }
            
        ],
    }

  },
  created() {

  	this.getCarousel();

  },

  methods:{

    getCarousel(){

      this.$store.commit('mainLoading', true);

    	this.$http.get('/cc/list',{parames:{include:"category"}}).then(
    		cc => {

        	this.ccData = cc.data.data;

          console.log(this.ccData);

          this.$store.commit('mainLoading', false);


        	}).catch(err => {
                this.$Notice.open({
                    title: 'termlist',
                })
            // this.$Message.error( 'termlist');
        
        })
    },
      
  }
}
</script>

